// 04jyhs/bizAdmin/JyhsbManage/JyhsbManage.js
var co = require('../../../resource/js/common.js')
var app = getApp()
var _this, _data
var _pageNum = 1
Page({
   data: {
      //回收帮成员列表
      JyhsMemberList: [],
      //是否隐藏显示底部提示
      hint: true,
      //frame高度
      frame_h: 1800
   },
   onLoad: function (opt) {
      _this = this;
      _data = this.data;
      _this.setData({
         frame_h: wx.getSystemInfoSync().windowHeight + 10
      })
      _this.getJyhsbMemberList()
   },
   onUnload: function () {
      _pageNum = 1
   },
   onReachBottom: function () {
      _this.getJyhsbMemberList()
   },
   getJyhsbMemberList: function () {
      wx.showLoading({
         title: '正在加载数据中...',
      })
      co.getShareApi('jyhs/Usermg/get_All_JYHSB_Users', {
         page: _pageNum
      }, function (res) {
         wx.hideLoading()
         if (res.code == 0) {
            var list = _data.JyhsMemberList.concat(res.data)
            _this.setData({
               JyhsMemberList: list
            })
            _pageNum++
         } else {
            _this.setData({
               hint: false
            })
            co.toastAllText(res.msg)
         }
      })
   },
   //查看订单
   lookOrder(e) {
      var User_ID = e.currentTarget.dataset.userid
       wx.navigateTo({
          url: '/04jyhs/bizAdmin/JyhsbManage/01lookOrder/lookOrder?User_ID=' + User_ID,
       })
   },
   //查看财务
   lookMoney(e) {
      var User_ID = e.currentTarget.dataset.userid
      wx.navigateTo({
         url: '/04jyhs/bizAdmin/JyhsbManage/02lookMoney/lookMoney?User_ID=' + User_ID,
      })
   },
})